Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(std/path) duplicate export sep/SEP and naming conventions #3332

Closed
wants to merge 1 commit into from

Conversation

kalisjoshua
Copy link

@kalisjoshua kalisjoshua commented Apr 25, 2023

issue: #3194

Summary

  1. Created new variable names to align with the - current, published - naming convention
  2. Kept the non-standard - to be deprecated - variables as alias to the standard versions
  3. Added @deprecated tags to each variable that will be removed in a future version
  4. Moved the separators.ts file to _separators.ts to align with the naming convention for files that should not be linked to directly
  5. Added comment to _separators.ts to detail why the file is necessary

I am completely open to suggestion/debate on anything proposed herein.

@kalisjoshua kalisjoshua requested a review from kt3k as a code owner April 25, 2023 15:41
@CLAassistant
Copy link

CLAassistant commented Apr 25, 2023

CLA assistant check
All committers have signed the CLA.

@kalisjoshua
Copy link
Author

I just noticed there are a lot of formatting changes that aren't intentional and I am working on removing them from this PR.

@kalisjoshua kalisjoshua force-pushed the path-issue-3194 branch 5 times, most recently from d093a70 to f6efa0c Compare April 25, 2023 17:28
@kalisjoshua
Copy link
Author

Just checking in on this to see if there is anything I can add/remove/change to keep this moving forward?

Comment on lines 14 to 16
export const sepPattern = isWindows ? /[\\/]+/ : /\/+/;
// @deprecated (will be removed after 0.187.0) use `sepPattern`
export const SEP_PATTERN = sepPattern;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The outcome of the discussions was to keep using upper snake case for constants: denoland/manual#625

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nayeemrmn good to know thank you. I will take a look and see if anything is necessary for this PR to continue or not. I will close it if I don't think anything is needed to change.

@kalisjoshua
Copy link
Author

Reviewing the changes I made the only thing that remains as a possible change and likely very low priority is bullet 4 (above) changing the filename of separator.ts to _separator.ts. I fully understand if that is not significant enough of a change to incorporate.

@kt3k
Copy link
Member

kt3k commented Apr 29, 2023

Keeping SEP looks good to me, but sep seems still exported from mod.ts.

Moved the separators.ts file to _separators.ts

I think this change is not desired. We usually prefer to allow importing items from its own file (to allow optimizing the dependency graph). (See #2936 for reference). We use _foo.ts pattern when the items in it are only private APIs.

@kalisjoshua
Copy link
Author

Closing because there is nothing more to change for this issue or branch.

@kalisjoshua kalisjoshua deleted the path-issue-3194 branch April 29, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants